<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no,viewport-fit=cover" />
    <title>奖惩审核</title>
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/weui.min.css')}}">
    <link rel="stylesheet" href="{{asset('/addons/jquery-weui-build/css/jquery-weui.css')}}">
    <link rel="stylesheet" href="{{asset('/css/system/iconfont.css')}}">
    <link rel="stylesheet" href="/css/system/front-iconfont.css?v={{time()}}">
    <link rel="stylesheet" href="{{asset('/css/system/shenhe.css')}}">
    @if($skinid == 3)
        <link rel="stylesheet" href="/css/system/common.css?v={{time()}}">
        <link rel="stylesheet" href="/css/system/rewards-punish1.css?v={{time()}}">
    @elseif($skinid == 1)
        <link rel="stylesheet" href="/css/theme-blue/system/common.css">
        <link rel="stylesheet" href="/css/theme-blue/system/rewards-punish1.css?v={{time()}}">
    @elseif($skinid == 2)
        <link rel="stylesheet" href="/css/theme-pink/system/iconfont-pink.css">
        <link rel="stylesheet" href="/css/theme-pink/system/common.css">
        <link rel="stylesheet" href="/css/theme-pink/system/rewards-punish1.css?v={{time()}}">
    @endif
    {{--<link rel="stylesheet" href="{{asset('/css/system/common.css')}}">--}}
    {{--<link rel="stylesheet" href="{{asset('/css/system/rewards-punish.css')}}">--}}
</head>
<body ontouchstart>
<div class="mian-container">
    <div class="rewards-punish">
        <div class="punish-top">
            待办事项管理
        </div>
        <div class="weui-tab">
          <div class="weui-navbar">
            <a class="weui-navbar__item " href="{{url('/user/reward/verify-list')}}">
              <i class="icon icon-a iconfont icon-xiaolian15"></i>
              <p>奖励<span style="color: red;">({{$rcount}})</span></p>
            </a>
            <a class="weui-navbar__item" href="{{url('/user/reward/verify-list')}}">
              <i class="icon icon-a iconfont icon-kulian"></i>
              <p>惩罚<span style="color: red;">({{$pcount}})</span></p>
            </a>
            <a class="weui-navbar__item weui-bar__item--on" href="{{url('/user/reward/verify-shenpi')}}">
              <div>
                  <div style="margin-top: 0.1rem">
                      <img class="waiting-img" src="/img/waiting1.png">
                  </div>
                  <p style="margin-top: -0.15rem">待办事项<span style="color: red;">({{$shenpicount}})</span></p>
              </div>
            </a>
          </div>
          <div class="weui-tab__bd">
            {{--<div id="tab1" class="weui-tab__bd-item weui-tab__bd-item--active">
                @foreach($reward as $p)
                    @if($p->is_effective != 0)
                        <div class="rewards-section">
                        <div class="header-sec">
                            <h3>{{$p->created_at->format('Ymd')}}奖励</h3>
                            <p class="icon-level">{{$p->grade}}</p>
                        </div>
                        <div class="middle-sec">
                            <p class="text-left">{{getUserName($p->from_user_id)}}对{{getUserName($p->to_user_id)}}</p>
                            <p class="text-middle">{{$p->reason}}</p>
                            <p class="text-right">@if($p->is_effective == 1)已通过@elseif($p->is_effective == 2)未通过@else审核中@endif</p>
                            <p class="text-list">审批流程</p>
                            <div class="hidden-list weui-cells">
                                @foreach($p->log as $k=>$pd)
                                    <div class="weui-cell">
                                        <div class="">
                                            @if($k != 0)
                                                <div class="shenhe-vline-before" >
                                                    <div class="weui-cell__bd" style="">

                                                    </div>
                                                </div>
                                            @endif
                                            @if($pd->method == 3)
                                                <div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>
                                            @elseif($pd->method == 2)
                                                <div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>
                                            @elseif($pd->method == 4)
                                                <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                            @else
                                                <i class="weui-icon-success shenhe-icon-success"></i>
                                            @endif
                                            @if($k != ($p->log->count()-1))
                                                <div class="shenhe-vline-after" >
                                                    <div class="weui-cell__bd" style="">

                                                    </div>
                                                </div>
                                            @endif
                                        </div>
                                        <div class="weui-cell__bd shenhe-content" style="    ">
                                            <p >{{usergroup($pd->group_id)}}<span class="shenhe-content-span" >{{str_limit($pd->des,14)}}</span>
                                                <span style="color:#ec6841; margin-left: 8px;" onclick="xianshi('{{$pd->des}}')">详情</span>
                                                <span class="shenhe-content-span-second" >{{$pd->created_at->format('Y-m-d')}}</span>
                                            </p>
                                            <div class="shenhe-content-time-div" >
                                                <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                                </div>
                                            </div>
                                        </div>
                                    </div>
                                @endforeach
                            </div>
                        </div>
                    </div>
                    @else
                        <div class="rewards-section">
                            <div class="header-sec">
                                <h3>{{$p->created_at->format('Ymd')}}奖励</h3>
                                <p class="icon-level">{{$p->grade}}</p>
                            </div>
                            <div class="middle-sec">
                                <p class="text-left">{{getUserName($p->from_user_id)}}对{{getUserName($p->to_user_id)}}</p>
                                <p class="text-middle">{{$p->reason}}</p>
                                <div>
                                    <a class="link-a change-level" href="javascript:void(0);" value="{{$p->grade}}" data-values="{{$p->score}}">修改等级</a>
                                    <input type="hidden" class="level-input">
                                    <a class="link-a pass-link" data-id="{{$p->id}}" href="javascript:void(0);">通过</a>
                                    <a class="link-a refuse-link" data-id="{{$p->id}}" href="javascript:void(0);">拒绝</a>
                                </div>
                                <p class="text-list">审批流程</p>
                                <div class="hidden-list weui-cells">
                                    @foreach($p->log as $k=>$pd)
                                        <div class="weui-cell">
                                            <div class="">
                                                @if($k != 0)
                                                    <div class="shenhe-vline-before" >
                                                        <div class="weui-cell__bd" style="">

                                                        </div>
                                                    </div>
                                                @endif
                                                @if($pd->method == 3)
                                                    <div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>
                                                @elseif($pd->method == 2)
                                                    <div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>
                                                @elseif($pd->method == 4)
                                                    <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                                @else
                                                    <i class="weui-icon-success shenhe-icon-success"></i>
                                                @endif
                                                @if($k != ($p->log->count()-1))
                                                    <div class="shenhe-vline-after" >
                                                        <div class="weui-cell__bd" style="">

                                                        </div>
                                                    </div>
                                                @endif
                                            </div>
                                            <div class="weui-cell__bd shenhe-content" style="    ">
                                                <p >{{usergroup($pd->group_id)}}<span class="shenhe-content-span" >{{str_limit($pd->des,14)}}</span>
                                                    <span style="color:#ec6841; margin-left: 8px;" onclick="xianshi('{{$pd->des}}')">详情</span>
                                                    <span class="shenhe-content-span-second" >{{$pd->created_at->format('Y-m-d')}}</span>
                                                </p>
                                                <div class="shenhe-content-time-div" >
                                                    <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    @endforeach
                                </div>
                            </div>
                        </div>
                    @endif
                @endforeach
            </div>
            <div id="tab2" class="weui-tab__bd-item">
                @foreach($punish as $p)
                    @if($p->is_effective != 0)
                        <div class="rewards-section">
                            <div class="header-sec">
                                <h3>{{$p->created_at->format('Ymd')}}惩罚</h3>
                                <p class="icon-level">{{$p->grade}}</p>
                            </div>
                            <div class="middle-sec">
                                <p class="text-left">{{getUserName($p->from_user_id)}}对{{getUserName($p->to_user_id)}}</p>
                                <p class="text-middle">{{$p->reason}}</p>
                                <p class="text-right">@if($p->is_effective == 1)已通过@elseif($p->is_effective == 2)未通过@else审核中@endif</p>
                                <p class="text-list">审批流程</p>
                                <div class="hidden-list weui-cells">
                                    @foreach($p->log as $k=>$pd)
                                        <div class="weui-cell">
                                            <div class="">
                                                @if($k != 0)
                                                    <div class="shenhe-vline-before" >
                                                        <div class="weui-cell__bd" style="">

                                                        </div>
                                                    </div>
                                                @endif
                                                @if($pd->method == 3)
                                                    <div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>
                                                @elseif($pd->method == 2)
                                                    <div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>
                                                @elseif($pd->method == 4)
                                                    <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                                @else
                                                    <i class="weui-icon-success shenhe-icon-success"></i>
                                                @endif
                                                @if($k != ($p->log->count()-1))
                                                    <div class="shenhe-vline-after" >
                                                        <div class="weui-cell__bd" style="">

                                                        </div>
                                                    </div>
                                                @endif
                                            </div>
                                            <div class="weui-cell__bd shenhe-content" style="    ">
                                                <p >{{usergroup($pd->group_id)}}<span class="shenhe-content-span" >{{str_limit($pd->des,14)}}</span>
                                                    <span style="color:#ec6841; margin-left: 8px;" onclick="xianshi('{{$pd->des}}')">详情</span>
                                                    <span class="shenhe-content-span-second" >{{$pd->created_at->format('Y-m-d')}}</span>
                                                </p>
                                                <div class="shenhe-content-time-div" >
                                                    <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    @endforeach
                                </div>
                            </div>
                        </div>
                    @else
                        <div class="rewards-section">
                            <div class="header-sec">
                                <h3>{{$p->created_at->format('Ymd')}}惩罚</h3>
                                <p class="icon-level">{{$p->grade}}</p>
                            </div>
                            <div class="middle-sec">
                                <p class="text-left">{{getUserName($p->from_user_id)}}对{{getUserName($p->to_user_id)}}</p>
                                <p class="text-middle">{{$p->reason}}</p>
                                <div>
                                    <a class="link-a change-level" href="javascript:void(0);" value="{{$p->grade}}" data-values="{{$p->score}}">修改等级</a>
                                    <input type="hidden" class="level-input">
                                    <a class="link-a pass-link" data-id="{{$p->id}}" href="javascript:void(0);">通过</a>
                                    <a class="link-a refuse-link" data-id="{{$p->id}}" href="javascript:void(0);">拒绝</a>
                                </div>
                                <p class="text-list">审批流程</p>
                                <div class="hidden-list weui-cells">
                                    @foreach($p->log as $k=>$pd)
                                        <div class="weui-cell">
                                            <div class="">
                                                @if($k != 0)
                                                    <div class="shenhe-vline-before" >
                                                        <div class="weui-cell__bd" style="">

                                                        </div>
                                                    </div>
                                                @endif
                                                @if($pd->method == 3)
                                                    <div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>
                                                @elseif($pd->method == 2)
                                                    <div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>
                                                @elseif($pd->method == 4)
                                                    <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                                @else
                                                    <i class="weui-icon-success shenhe-icon-success"></i>
                                                @endif
                                                @if($k != ($p->log->count()-1))
                                                    <div class="shenhe-vline-after" >
                                                        <div class="weui-cell__bd" style="">

                                                        </div>
                                                    </div>
                                                @endif
                                            </div>
                                            <div class="weui-cell__bd shenhe-content" style="    ">
                                                <p >{{usergroup($pd->group_id)}}<span class="shenhe-content-span" >{{str_limit($pd->des,14)}}</span>
                                                    <span style="color:#ec6841; margin-left: 8px;" onclick="xianshi('{{$pd->des}}')">详情</span>
                                                    <span class="shenhe-content-span-second" >{{$pd->created_at->format('Y-m-d')}}</span>
                                                </p>
                                                <div class="shenhe-content-time-div" >
                                                    <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                                    </div>
                                                </div>
                                            </div>
                                        </div>
                                    @endforeach
                                </div>
                            </div>
                        </div>
                    @endif
                @endforeach
            </div>--}}
              <div id="tab3" class="weui-tab__bd-item weui-tab__bd-item--active">
                  @foreach($shenpi as $re)
                      @if($re->status == 0)
                          <div class="rewards-section">
                              <div class="header-sec">
                                  <h3>{{date('Y-m-d',strtotime($re->date_param))}} {{$kind_array[$re->kind-1]}}</h3>
                              </div>
                              <div class="middle-sec">
                                  <p class="text-left">{{getUserName($re->from_user_id)}}:</p>
                                  <p class="text-middle">{{$re->description}}</p>
                                  <div class="linkcon">
                                      <input type="hidden" class="level-input">
                                      <a class="link-a pass-link3" data-id="{{$re->id}}" href="javascript:void(0);">通过</a>
                                      <a class="link-a refuse-link3" data-id="{{$re->id}}" href="javascript:void(0);">拒绝</a>
                                  </div>
                                  <p class="text-list">审批流程</p>
                                  <div class="hidden-list weui-cells">
                                      @foreach($re->log as $k=>$pd)
                                          <div class="weui-cell">
                                              <div class="">
                                                  @if($k != 0)
                                                      <div class="shenhe-vline-before" >
                                                          <div class="weui-cell__bd" style="">

                                                          </div>
                                                      </div>
                                                  @endif
                                                      @if($pd->method == 3)
                                                          <div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>
                                                      @elseif($pd->method == 2)
                                                          <div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>
                                                      @elseif($pd->method == 4)
                                                          <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                                      @else
                                                          <i class="weui-icon-success shenhe-icon-success"></i>
                                                      @endif
                                                  {{--<i class="weui-icon-success shenhe-icon-success"></i>--}}
                                                      @if($k != ($re->log->count()-1))
                                                          <div class="shenhe-vline-after" >
                                                              <div class="weui-cell__bd" style="">

                                                              </div>
                                                          </div>
                                                      @endif
                                                  {{--<div class="shenhe-vline-after" >
                                                      <div class="weui-cell__bd" style="">

                                                      </div>
                                                  </div>--}}
                                              </div>
                                              <div class="weui-cell__bd shenhe-content" style="    ">
                                                  <p >
                                                      @if($pd->method == 0)
                                                      发起申请
                                                      @elseif($pd->method == 4)
                                                          等待审核
                                                      @elseif($pd->method == 1)
                                                          审核通过
                                                      @elseif($pd->method == 2)
                                                          审核拒绝
                                                      @endif

                                                      <span class="shenhe-content-span" >{{str_limit($pd->des,14)}}</span>
                                                      <span class="shenhe-content-span-second" >{{$pd->created_at->format('Y-m-d')}}</span>
                                                  </p>
                                                  <div class="shenhe-content-time-div" >
                                                      <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      @endforeach
                                  </div>
                              </div>
                          </div>
                      @else
                          <div class="rewards-section">
                              <div class="header-sec">
                                  <h3>{{date('Y-m-d',strtotime($re->date_param))}} {{$kind_array[$re->kind-1]}}</h3>
                              </div>
                              <div class="middle-sec">
                                  <p class="text-left">{{getUserName($re->from_user_id)}}</p>
                                  <p class="text-middle">{{$re->description}}</p>
                                  @if($re->status == 1)
                                  <p class="text-right">已通过</p>
                                  @else
                                  <p class="text-right1">已拒绝</p>
                                  @endif
                                  <p class="text-list">审批流程</p>
                                  <div class="hidden-list weui-cells">
                                      @foreach($re->log as $k=>$pd)
                                          <div class="weui-cell">
                                              <div class="">
                                                  @if($k != 0)
                                                      <div class="shenhe-vline-before" >
                                                          <div class="weui-cell__bd" style="">

                                                          </div>
                                                      </div>
                                                  @endif
                                                  @if($pd->method == 3)
                                                      <div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>
                                                  @elseif($pd->method == 2)
                                                      <div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>
                                                  @elseif($pd->method == 4)
                                                      <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                                  @else
                                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                                  @endif
                                                  {{--<i class="weui-icon-success shenhe-icon-success"></i>--}}
                                                  @if($k != ($re->log->count()-1))
                                                      <div class="shenhe-vline-after" >
                                                          <div class="weui-cell__bd" style="">

                                                          </div>
                                                      </div>
                                                  @endif
                                                  {{--<div class="shenhe-vline-after" >
                                                      <div class="weui-cell__bd" style="">

                                                      </div>
                                                  </div>--}}
                                              </div>
                                              <div class="weui-cell__bd shenhe-content" style="    ">
                                                  <p >
                                                      @if($pd->method == 0)
                                                          发起申请
                                                      @elseif($pd->method == 4)
                                                          等待审核
                                                      @elseif($pd->method == 1)
                                                          审核通过
                                                      @elseif($pd->method == 2)
                                                          审核拒绝
                                                      @endif

                                                      <span class="shenhe-content-span" >{{str_limit($pd->des,14)}}</span>
                                                      <span class="shenhe-content-span-second" >{{$pd->created_at->format('Y-m-d')}}</span>
                                                  </p>
                                                  <div class="shenhe-content-time-div" >
                                                      <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                                      </div>
                                                  </div>
                                              </div>
                                          </div>
                                      @endforeach
                                  </div>
                              </div>
                          </div>
                      @endif

                  @endforeach
                {{--  <div class="rewards-section">
                      <div class="header-sec">
                          <h3>2021-02-21 出差</h3>
                      </div>
                      <div class="middle-sec">
                          <p class="text-left">张丹丹</p>
                          <p class="text-middle">宴请费用2000，差旅费800</p>
                          <p class="text-right">已通过</p>
                          <p class="text-list">审批流程</p>
                          <div class="hidden-list weui-cells">
                              <div class="weui-cell">
                                      <div class="">
                                          --}}{{--@if($k != 0)--}}{{--
                                              --}}{{--<div class="shenhe-vline-before" >--}}{{--
                                                  --}}{{--<div class="weui-cell__bd" style="">--}}{{--

                                                  --}}{{--</div>--}}{{--
                                              --}}{{--</div>--}}{{--
                                          --}}{{--@endif--}}{{--
                                          --}}{{--@if($pd->method == 3)--}}{{--
                                              --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                          --}}{{--@elseif($pd->method == 2)--}}{{--
                                              --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                          --}}{{--@elseif($pd->method == 4)--}}{{--
                                              --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                          --}}{{--@else--}}{{--
                                              --}}{{--<i class="weui-icon-success shenhe-icon-success"></i>--}}{{--
                                          --}}{{--@endif--}}{{--
                                          --}}{{--@if($k != ($p->log->count()-1))--}}{{--
                                              --}}{{--<div class="shenhe-vline-after" >--}}{{--
                                                  --}}{{--<div class="weui-cell__bd" style="">--}}{{--

                                                  --}}{{--</div>--}}{{--
                                              --}}{{--</div>--}}{{--
                                          --}}{{--@endif--}}{{--
                                              <i class="weui-icon-success shenhe-icon-success"></i>
                                              <div class="shenhe-vline-after" >
                                                  <div class="weui-cell__bd" style="">

                                                  </div>
                                              </div>
                                      </div>
                                      <div class="weui-cell__bd shenhe-content" style="    ">
                                          <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                              <span class="shenhe-content-span-second" >2021-02-21</span>
                                          </p>
                                          <div class="shenhe-content-time-div" >
                                              <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                              </div>
                                          </div>
                                      </div>
                                  </div>
                              <div class="weui-cell">
                                  <div class="">
                                      <div class="shenhe-vline-before" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="weui-cell">
                                  <div class="">
                                      <div class="shenhe-vline-before" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                          </div>
                      </div>
                  </div>
                  <div class="rewards-section">
                      <div class="header-sec">
                          <h3>2018-04-08 事假</h3>
                      </div>
                      <div class="middle-sec">
                          <p class="text-left">王莹:</p>
                          <p class="text-middle">身体不适</p>
                          <div class="linkcon">
                              <input type="hidden" class="level-input">
                              <a class="link-a pass-link3" data-id="" href="javascript:void(0);">通过</a>
                              <a class="link-a refuse-link3" data-id="" href="javascript:void(0);">拒绝</a>
                          </div>
                          <p class="text-list">审批流程</p>
                          <div class="hidden-list weui-cells">
                              <div class="weui-cell">
                                  <div class="">
                                      --}}{{--@if($k != 0)--}}{{--
                                      --}}{{--<div class="shenhe-vline-before" >--}}{{--
                                      --}}{{--<div class="weui-cell__bd" style="">--}}{{--

                                      --}}{{--</div>--}}{{--
                                      --}}{{--</div>--}}{{--
                                      --}}{{--@endif--}}{{--
                                      --}}{{--@if($pd->method == 3)--}}{{--
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--@elseif($pd->method == 2)--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--@elseif($pd->method == 4)--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      --}}{{--@else--}}{{--
                                      --}}{{--<i class="weui-icon-success shenhe-icon-success"></i>--}}{{--
                                      --}}{{--@endif--}}{{--
                                      --}}{{--@if($k != ($p->log->count()-1))--}}{{--
                                      --}}{{--<div class="shenhe-vline-after" >--}}{{--
                                      --}}{{--<div class="weui-cell__bd" style="">--}}{{--

                                      --}}{{--</div>--}}{{--
                                      --}}{{--</div>--}}{{--
                                      --}}{{--@endif--}}{{--
                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                      <div class="shenhe-vline-after" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="weui-cell">
                                  <div class="">
                                      <div class="shenhe-vline-before" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      <div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                          </div>
                      </div>
                  </div>
                  <div class="rewards-section">
                      <div class="header-sec">
                          <h3>2021-02-21 出差</h3>
                      </div>
                      <div class="middle-sec">
                          <p class="text-left">张丹丹</p>
                          <p class="text-middle">宴请费用2000，差旅费800</p>
                          <p class="text-right1">已拒绝</p>
                          <p class="text-list">审批流程</p>
                          <div class="hidden-list weui-cells">
                              <div class="weui-cell">
                                  <div class="">
                                      --}}{{--@if($k != 0)--}}{{--
                                      --}}{{--<div class="shenhe-vline-before" >--}}{{--
                                      --}}{{--<div class="weui-cell__bd" style="">--}}{{--

                                      --}}{{--</div>--}}{{--
                                      --}}{{--</div>--}}{{--
                                      --}}{{--@endif--}}{{--
                                      --}}{{--@if($pd->method == 3)--}}{{--
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--@elseif($pd->method == 2)--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--@elseif($pd->method == 4)--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      --}}{{--@else--}}{{--
                                      --}}{{--<i class="weui-icon-success shenhe-icon-success"></i>--}}{{--
                                      --}}{{--@endif--}}{{--
                                      --}}{{--@if($k != ($p->log->count()-1))--}}{{--
                                      --}}{{--<div class="shenhe-vline-after" >--}}{{--
                                      --}}{{--<div class="weui-cell__bd" style="">--}}{{--

                                      --}}{{--</div>--}}{{--
                                      --}}{{--</div>--}}{{--
                                      --}}{{--@endif--}}{{--
                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                      <div class="shenhe-vline-after" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="weui-cell">
                                  <div class="">
                                      <div class="shenhe-vline-before" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                              <div class="weui-cell">
                                  <div class="">
                                      <div class="shenhe-vline-before" >
                                          <div class="weui-cell__bd" style="">

                                          </div>
                                      </div>
                                      --}}{{--<div class="shenhe-icon-div" ><img src="/images/shenhe/xiugai.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/chahao.png" ></div>--}}{{--
                                      --}}{{--<div  class="shenhe-icon-div" ><img src="/images/shenhe/wenhao.png" ></div>--}}{{--
                                      <i class="weui-icon-success shenhe-icon-success"></i>
                                  </div>
                                  <div class="weui-cell__bd shenhe-content" style="    ">
                                      <p >发起申请<span class="shenhe-content-span" >王莹发起11111</span>
                                          <span class="shenhe-content-span-second" >2021-02-21</span>
                                      </p>
                                      <div class="shenhe-content-time-div" >
                                          <div class="weui-cell__bd shenhe-time-content" style="text-align: right;">

                                          </div>
                                      </div>
                                  </div>
                              </div>
                          </div>
                      </div>
                  </div>--}}
              </div>
             {!! csrf_field() !!}
          </div>
        </div>
    </div>
    @include('frontuser.caidan')
    {{--隐藏部分--}}
    <div class="shadow-hidden"></div>
    <div class="hidden-sec">
        <div class="popup"><h3>填写拒绝理由</h3><i class="weui-icon-cancel"></i></div>
        <p>请填写拒绝理由</p>
        <textarea type="text" value="" name="pro-reason" class="input text-input" placeholder="选填"></textarea>

        <a class="sub-mit modi-nickname" href="javascript:void(0);">保存</a>
    </div>
    {{--        <!--底部固定部分-->
    <div class="reful-tabbar">
        <a href="javascript:void(0)" class="kaohe-item tabbar-item ">
            <i class="icon iconfont icon-kaoping icon-footer"></i>
            <p class="tabbar-label">考评</p>
        </a>
        <a href="{{url('/user/message/index')}}" class="tabbar-item ">
            <i class="icon iconfont icon-yinliang icon-footer"></i>
            <p class="tabbar-label">消息中心</p>
        </a>
        <a href="{{url('/user/reward/reward')}}" class="tabbar-item active">
            <i class="icon iconfont icon-jinggao icon-footer"></i>
            <p class="tabbar-label">奖励惩罚</p>
        </a>
        <a href="javascript:void(0)" class="set-btn tabbar-item">
            <i class="icon iconfont icon-shezhi1-copy icon-footer"></i>
            <p class="tabbar-label">设置</p>
        </a>
    </div>--}}
</div>
<script src="{{asset('/kaohe/js/jquery-2.1.4.min.js')}}"></script>
<script src="{{asset('/addons/jquery-weui-build/js/fastclick.js')}}"></script>
<script>
    $(function() {
        document.documentElement.style.fontSize = document.documentElement.clientWidth / 7.5 + 'px';
        FastClick.attach(document.body);
    });
</script>
<script src="{{asset('/addons/jquery-weui-build/js/jquery-weui.min.js')}}"></script>
<script>
    function xianshi(a){
        $.toast(a,"text");
    }

    $(document).ready(function () {
        $('.text-list').click(function(){
            $(this).toggleClass('text-cha');
            $(this).next('.hidden-list').toggle();
        })
        $('.kaohe-item').click(function(){
            $('.front-show-hidden').toggle();
        })
        $('.set-btn').click(function () {
            $('.set-hidden').toggle();
        })
        /*$('.change-level').click(function(){
            var that = this
            $(that).picker({
              title: "选择等级",
              cols: [
                {
                  textAlign: 'center',
                  values: [ '低级','中级', '高级']
                }
              ],
              onClose: function(data){
                  //ajax，后台
                console.log( $(that).parent().parent().parent().find('.icon-level').text());
                 
                $(that).parent().parent().parent().find('.icon-level').text(data.value[0]);
              }
            });  
        });*/


        var rearray = '';
        $(".change-level").select({
            title: "选择等级",
            items: rearray,
            autoClose:false,
            onChange:function (da) {
                console.log(da);
            },
            onClose:function(data){
                $(data.$input).parent().parent().parent().find('p.icon-level').text(data.data.titles);
            }
        });

        var puarray = '';
        $(".change-p-level").select({
            title: "选择等级",
            items: puarray
        });


        $('.refuse-link').click(function(){
            $('.shadow-hidden').css('display','block');
            $('.hidden-sec').css('display','block');

            var reason  = $("textarea[name='pro-reason']").val();
            var rid = $(this).attr('data-id');
            //var grade = $(this).parent().find('a.change-level').val();
            //var level = $(this).parent().find('a.change-level').attr('data-values');

            var token = $('input[name=_token]').val();
            $('.sub-mit').off('click').on('click',function(){
                var reason  = $("textarea[name='pro-reason']").val();
                if(reason.length > 30){
                    $.toast('原因太长,请减少字数','text');
                    return false;
                }
                $.ajax({
                    'url': '/user/reward/verify-shenhe?agree=2&_token='+token+'&rid='+rid,
                    'type': 'POST',
                    'data': '&reason='+reason,
                    error: function (request) {
                        $.toast('出现错误',"text");
                    },
                    success: function (data) {
                        if (data.status == 'success') {
                            $.toast("操作成功");
                            setTimeout(function(){ window.location.reload(); }, 1000);
                        } else {
                            $.toast(data.msg,"text");
                        }
                    },
                });
                $('.hidden-sec').css('display','none');
                $('.shadow-hidden').css('display','none');
            })
        });

        $('.hidden-sec .popup i').click(function () {
            $('.hidden-sec').css('display','none');
            $('.shadow-hidden').css('display','none');
        });

        $('.pass-link3').click(function(){
            var rid = $(this).attr('data-id');
            var grade = $(this).parent().find('a.change-level').attr('value');
            var level = $(this).parent().find('a.change-level').attr('data-values');
//            alert(grade);
//            alert(level);
            var token = $('input[name=_token]').val();
            $.ajax({
                'url': '/user/reward/verify-shenpi?agree=1&_token='+token+'&rid='+rid,
                'type': 'POST',
                'data': '&grade='+grade+'&level='+level,
                error: function (request) {
                    $.toast('网络错误',"text");
                },
                success: function (data) {
                    if (data.status == 'success') {
                        $.toast("操作成功");
                        setTimeout(function(){ window.location.reload(); }, 1000);
                    } else {
                        $.toast(data.msg,"text");
                    }
                },
            });
        });

        $('.refuse-link3').click(function(){
            var rid = $(this).attr('data-id');
            //var grade = $(this).parent().find('a.change-level').attr('value');
            //var level = $(this).parent().find('a.change-level').attr('data-values');
//            alert(grade);
//            alert(level);
            var token = $('input[name=_token]').val();
            $.ajax({
                'url': '/user/reward/verify-shenpi?agree=2&_token='+token+'&rid='+rid,
                'type': 'POST',
                'data': '',
                error: function (request) {
                    $.toast('网络错误',"text");
                },
                success: function (data) {
                    if (data.status == 'success') {
                        $.toast("操作成功");
                        setTimeout(function(){ window.location.reload(); }, 1000);
                    } else {
                        $.toast(data.msg,"text");
                    }
                },
            });
        });
    })
</script>
</body>
</html>